package fin_enum

import "gitee.com/lailonghui/vehicle-supervision-framework/pkg/dicts"

// 财务-车辆缴费状态
type finVehFeeBillStatus int

var FinVehFeeBillStatus finVehFeeBillStatus

// 待审核
func (c *finVehFeeBillStatus) WaitAudit() int {
	return 1
}

// 已审核
func (c *finVehFeeBillStatus) AuditPass() int {
	return 2
}

// 已撤销
func (c *finVehFeeBillStatus) Cancel() int {
	return 3
}

// 已退回
func (c *finVehFeeBillStatus) Return() int {
	return 4
}

func (c *finVehFeeBillStatus) ToText(value int) string {
	switch value {

	case 1:
		return "待审核"

	case 2:
		return "已审核"

	case 3:
		return "已撤销"

	case 4:
		return "已退回"

	}
	return ""
}

func (c *finVehFeeBillStatus) ToDict(value int) *dicts.IntDict {
	return &dicts.IntDict{
		Text:  c.ToText(value),
		Value: value,
	}
}

func (c *finVehFeeBillStatus) ToValue(text string) int {
	switch text {

	case "待审核":
		return 1

	case "已审核":
		return 2

	case "已撤销":
		return 3

	case "已退回":
		return 4

	}
	return 0
}
